import pond.common.S;
import pond.web.Pond;
import pond.web.spi.BaseServer;
import pond.web.spi.server.netty.NettyHttpServer;


public class PondTest {

  public static void main(String[] args) {
    S._debug_on(BaseServer.class);
    S.config.set(NettyHttpServer.class, NettyHttpServer.EVENT_GROUP_WORKER_GROUP_COUNT, "40");
    S.config.set(NettyHttpServer.class, NettyHttpServer.EVENT_GROUP_BOSS_GROUP_COUNT, "5");
    S.config.set(Pond.class, Pond.CONFIG_SO_BACKLOG, "1024");
    Pond.config(Pond.STATIC_SERVER_ENABLE_LISTING_DIR, "true");
    Pond.init(p -> {
      p.get("/.*", p._static("www"));
      p.get("/", (req, resp) -> {
        resp.send(200, "OK");
      });
    }).listen(8128);
  }
}
